home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / Sample Code / Newton Sample Code 1.2 / System Services / FalseAlarm-2 / Project Data < prev   
Encoding:
Text File  |  1994-05-24  |  948 b   |  45 lines  |  [TEXT/R*ch]

  1. /*
  2.  
  3. Copyright © 1994 Apple Computer, Inc. All Rights Reserved.
  4. author Mike Engber
  5.  
  6. FalseAlarm-2
  7.  
  8. version history
  9.  
  10. v1 - initial release
  11.  
  12. v2
  13.   - uses new alarm stub
  14.   - bug fix - if the FalseAlarm app was closed when the alarm went
  15.     off, DoAlarm blindly sent messages to a child view (that didn't
  16.     exist since FalseAlarm was closed)
  17.  
  18.  */
  19.  
  20. constant kAppSymbol := '|FalseAlarm:PIEDTS|;
  21. constant kAppString := "FalseAlarm:PIEDTS";
  22.  
  23. refNum := OpenResFileX( Home & "FalseAlarm.rsrc"); 
  24.   DefConst('kAlarmSound,GetSound("dadadadadada"));
  25. CloseResFileX(refNum);
  26.  
  27. DefConst('kAlarmFn,
  28. func()
  29.   begin
  30.     if GetRoot().(kAppSymbol) exists then
  31.       GetRoot().(kAppSymbol):DoAlarm()
  32.     else
  33.       GetRoot():Notify(kNotifyAlert,"FalseAlarm","App not installed.");
  34.   end
  35. );
  36.  
  37. DefConst('kPopUpList,[
  38. { item:  "1 minute",  dt:   1, },
  39. { item:  "2 minutes", dt:   2, },
  40. { item:  "5 minutes", dt:   5, },
  41. { item: "10 minutes", dt:   10,},
  42. ]);
  43.  
  44. "Reg the llama";
  45.